#include<iostream>
#include<string>
using namespace std;
using std::cin;
const string hexdigits="0123456789ABCDEF";
int main()
{
	cout << "enter a seriesof number between 0 and 15"
	     << "separated by space.Hit ENTER when finished:"
	     << endl;
	string result;
	string::size_type n;
	while(cin>>n)
	    if(n<hexdigits.size())
	        result+=hexdigits[n];

	cout<<"your hex number is: "<<result<<endl;
    return 0;
}